import { ref } from 'vue'
import { defineStore } from 'pinia'

export const useTokenStore = defineStore('token', () => {
    // 设置token
    const token = ref<string>('')
    const setToken = (value: string) => {
        token.value = value
    }
    return { token, setToken }
},
    // 固化插件
    {
        persist: {
            storage: sessionStorage,
        }
    }
)
